fix: make the new nsview as the first responder.
authorZhi <yfwz100@yeah.net>
Mon, 14 Jun 2021 16:06:35 +0000 (00:06 +0800)
committerZhi <yfwz100@yeah.net>
Mon, 14 Jun 2021 16:09:46 +0000 (00:09 +0800)
Make the new view as the first responder(focused) so the new view can
accept events from input method.

Fixes #3968.

gdk/macos/gdkmacosglcontext.c

index b785beadc053af97f1482a74db17182c2b4d67a8..e4ef4abcb10824e4b6ae2a2bc2419ea324e4f184 100644 (file)
@@ -145,6 +145,7 @@ ensure_gl_view (GdkMacosGLContext *self)
       [nsview setPostsFrameChangedNotifications: YES];
       [nsview setNeedsDisplay:YES];
       [nswindow setContentView:nsview];
+      [nswindow makeFirstResponder:nsview];
       [nsview release];
 
       if (self->dummy_view != NULL)